import request from '@/utils/request'

// 查询用工单位列表
export function listEmployer(query) {
  return request({
    url: '/insurance/employer/list',
    method: 'get',
    params: query
  })
}

// 查询用工单位详细
export function getEmployer(id) {
  return request({
    url: '/insurance/employer/' + id,
    method: 'get'
  })
}

// 新增用工单位
export function addEmployer(data) {
  return request({
    url: '/insurance/employer',
    method: 'post',
    data: data
  })
}

// 修改用工单位
export function updateEmployer(data) {
  return request({
    url: '/insurance/employer',
    method: 'put',
    data: data
  })
}

// 删除用工单位
export function delEmployer(id) {
  return request({
    url: '/insurance/employer/' + id,
    method: 'delete'
  })
}

// 导出用工单位
export function exportEmployer(query) {
  return request({
    url: '/insurance/employer/export',
    method: 'get',
    params: query
  })
}